package main

import (
	"github.com/ntt360/pmon2/app"
	"github.com/ntt360/pmon2/client/cmd"
	"log"
	"os"
)

func main() {
	conf := os.Getenv("PMON2_CONFIG_FILE")
	if conf == "" {
		panic("请设置环境变量 PMON2_CONFIG_FILE")
	}
	err := app.Instance(conf)
	if err != nil {
		log.Fatal(err)
	}

	err = cmd.Exec()
	if err != nil {
		log.Fatal(err)
	}
}
